﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using PiscoSourPersistencia;
using PiscoSourDominio;

namespace PiscoSourSOAPServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Reservas" in code, svc and config file together.
    public class Reservas : IReservas
    {
        private ReservaDAO reservaDAO = null;
        private ReservaDAO ReservaDAO
        {
            get
            {
                if (reservaDAO == null)
                    reservaDAO = new ReservaDAO();
                return reservaDAO;
            }
        }

        public string InsertarReserva(Reserva objReserva)
        {
            return ReservaDAO.InsertarReserva(objReserva);
        }

        public string EliminarReserva(Reserva objReserva)
        {
            return ReservaDAO.EliminarReserva(objReserva);
        }

        public string ActualizarReserva(Reserva objReserva)
        {
            return ReservaDAO.ActualizarReserva(objReserva);
        }

        public List<Reserva> ListarReservas()
        {
            return ReservaDAO.ListarReservas().ToList();
        }
    }
}
